package com.itheima.test1;

import java.util.ArrayList;
import java.util.Arrays;

public class MyCollectionDemo1 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4};
        String[] arr1 = {"a", "b", "c"};
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(arr1));

        ArrayList<String> list = new ArrayList<>();
        list.add("abc");
        list.add("def");
        list.add("ghi");
        System.out.println(list);
        //如果要存储基本数据类型,那么实际存储的是他们的包装类
        ArrayList<Integer> list1 = new ArrayList<Integer>();
        list1.add(1);
        list1.add(2);
        list1.add(3);
        list1.add(4);
        System.out.println(list1);
    }
}
